package com.ccut.xunfeiSpringboot.common;

import cn.xfyun.api.IseClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class IseClientConfig {

    @Value("${xfyun.appid}")
    private String appId;

    @Value("${xfyun.apikey}")
    private String apiKey;

    @Value("${xfyun.apiSecret}")
    private String apiSecret;

    @Bean
    public IseClient iseClient() {
        return new IseClient.Builder()
                .signature(appId, apiKey, apiSecret)
                .addSub("ise")
                .addEnt("cn_vip")
                .addCategory("read_sentence")
                .addTte("utf-8")
                .addRstcd("utf8")
                .build();
    }
}
